package com.example.springboot_first.service;

import com.example.springboot_first.pojo.User;
import com.example.springboot_first.pojo.dto.UserDto;
import org.springframework.stereotype.Service;

//spring的bean
@Service
public interface IUserService {
    /**
     * 添加用户
     *
     * @param user
     * @return
     */
    User add(UserDto user);

    /**
     * 查询用户
     * @param userid 用户id
     * @return
     */
    User getUser(Integer userid);

    /**
     * 修改用户
     * @param user 修改用户对象
     * @return
     */
    User edit(UserDto user);
    /**
     * 删除用户
     *
     * @param userid 用户id
     */
    void delete(Integer userid);
}
